import request from '../utils/request'

export const searchAPI = (params) => {
    return request.get('https://api.a20safe.com/api.php?api=10&key=e5f907b4ba1f08c8503433a5da97f0c9', {
        params: {
            search: params,
            type: 'so',
            // platform: '2'
        }
    })
}

export const getMusicAPI = (id) => {
    return request.get('https://api.a20safe.com/api.php?api=10&key=e5f907b4ba1f08c8503433a5da97f0c9', {
        params: {
            search: id,
            type: 'song'
        }
    })
}

export const getMvAPI = (id) => {
    return request.get('https://api.a20safe.com/api.php?api=10&key=e5f907b4ba1f08c8503433a5da97f0c9', {
        params: {
            search: id,
            type: 'mv'
        }
    })
}

export const getCommentAPI = (id) => {
    return request.get('https://api.a20safe.com/api.php?api=10&key=e5f907b4ba1f08c8503433a5da97f0c9', {
        params: {
            search: id,
            type: 'comment'
        }
    })
}

export const getLyricAPI = (id) => {
    return request.get('https://api.a20safe.com/api.php?api=10&key=e5f907b4ba1f08c8503433a5da97f0c9', {
        params: {
            search: id,
            type: 'lrc'
        }
    })
}